﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Projektet.Model.Combat
{
    public enum AttackType
    {
        Sword,
        Pike,
        Arrow,
        Other
    }
    public class Attack
    {
        private float _power;
        private AttackType _attackType;
        
        public float Power 
        { 
            get { return _power; }
        }
        public AttackType AttackType 
        {
            get { return _attackType; }
        }

        public Attack(float power, CombatUnit cUnit) 
        {
            _power = power;
            AttackType attackType;
            switch(cUnit.GetType().Name)
            {
                case "Pikeman":
                    attackType = AttackType.Pike;
                    break;
                case "Archer":
                    attackType = AttackType.Arrow;
                    break;
                case "Knight":
                    attackType = AttackType.Sword;
                    break;
                default:
                    attackType = AttackType.Other;
                    break;
            }                        
            _attackType = attackType;
        }        
    }
}
